<template>
  <el-container style="height: 100%">
    <el-header>
      <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" :router="true">
        <el-submenu index="1">
          <template #title>配图管理</template>
          <el-menu-item index="1-1">配图管理</el-menu-item>
          <el-menu-item index="1-2" route="/newStyle">新建配图</el-menu-item>
        </el-submenu>
        <el-submenu index="2">
          <template #title>矢量切片</template>
          <el-menu-item index="2-1">切片管理</el-menu-item>
          <el-menu-item index="2-2">新建切片</el-menu-item>
          <el-menu-item index="2-3">选项3</el-menu-item>
        </el-submenu>
        <el-submenu index="3">
          <template #title>栅格切片</template>
          <el-menu-item index="3-1">切片管理</el-menu-item>
          <el-menu-item index="3-2">新建切片</el-menu-item>
        </el-submenu>
        <el-menu-item index="4">数据源管理</el-menu-item>
        <el-menu-item index="5">系统配置</el-menu-item>
      </el-menu>

    </el-header>
    <el-main>
      <router-view></router-view>
    </el-main>
  </el-container>
</template>

<script>
export default {
  name: "Home",
  data(){
    return{
      activeIndex:"1"
    }
  },
  methods:{
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    }
  }
}
</script>

<style scoped>

</style>
